<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>订单管理</title>
    <%@ include file="../common/meta.jsp" %>
    <%@ include file="../common/common-body.jsp" %>
    <link href="${ctx}/css/page/common-list.css?t=${now}" rel="stylesheet">
    <link href="${ctx}/css/page/common-search.css?t=${now}" rel="stylesheet">
    <style>
    </style>
    <script>
        var statusMap = ${statusMap};
        var sourceMap = ${sourceMap};
        var payStatusMap = ${payStatusMap};
        var searchInfo = ${searchInfo};
        var inquiryStatusMap = ${inquiryStatusMap};
        var channelMap = ${channelMap};
    </script>
</head>
<body class="gray-bg">
<div id="vue">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><i class="fa fa-search"></i> 筛选查询</h5>
                    </div>
                    <div class="ibox-content ibox-content-search">
                        <form class="form-horizontal m-t" id="searchForm" novalidate="novalidate">
                            <div class="form-group">
                                <label class="col-sm-1 control-label">查询订单：</label>
                                <div class="col-sm-5">
                                    <input type="text" name="orderId" onkeydown="if(event.keyCode==13){doRefresh();return false;}" id="orderId" class="form-control"  placeholder="输入订单ID（精确）" maxlength="64"
                                           value="${not empty searchInfo ? searchInfo.orderId : ''}">
                                </div>
                                <label class="col-sm-1 control-label">服务商：</label>
                                <div class="col-sm-3">
                                    <div class="input-group">
                                        <input type="hidden" id="isvPid" name="isvPid" value="${not empty searchInfo ? searchInfo.isvPid : ''}">
                                        <input type="text" id="isvName" name="isvName" class="form-control" placeholder="请输入服务商" :value="orderInfo.isvName">
                                        <div class="input-group-btn">
                                            <button type="button" class="btn btn-default dropdown-toggle mySearchBtn" data-toggle="dropdown">
                                                <span class="caret"></span>
                                            </button>
                                            <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <div class="ibox-tools ibox-tools-search">
                                    <button type="button" class="btn btn-primary btn-outline" onclick="doRefresh()">查询</button>
                                    <button type="button" class="btn btn-primary btn-outline" onclick="clearForm('searchForm')">重置</button>
                                    <button type="button" class="btn btn-primary btn-outline" onclick="openSearchTools();"><i class="fa fa-caret-down"></i></button>
                                </div>
                            </div>
                            <div class="search-tools">
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">订单名称：</label>
                                    <div class="col-sm-2">
                                        <input type="text" name="orderName" onkeydown="if(event.keyCode==13){doRefresh();return false;}" id="orderName" class="form-control"  placeholder="输入订单名称" maxlength="30"
                                               value="${not empty searchInfo ? searchInfo.orderName : ''}">
                                    </div>

                                    <label class="col-sm-1 control-label">用户UID：</label>
                                    <div class="col-sm-2">
                                        <input type="text" name="userId" onkeydown="if(event.keyCode==13){doRefresh();return false;}" id="userId" class="form-control"  placeholder="输入用户UID（精确）" maxlength="64"
                                               value="${not empty searchInfo ? searchInfo.userId : ''}">
                                    </div>

                                    <label class="col-sm-1 control-label">创建时间：</label>
                                    <div class="col-sm-5">
                                        <input type="text" name="gmtCreateStr" class="form-control layer-date" id="gmtCreateStr" class="form-control"  placeholder="创建时间"
                                               value="${not empty searchInfo ? searchInfo.gmtCreateStr : ''}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">输出平台：</label>
                                    <div class="col-sm-2">
                                        <select class="form-control" name="source" id="source" onchange="doRefresh()">
                                            <option value="">--请选择--</option>
                                            <c:forEach items="${sourceMap}" var="item">
                                                <option value="${item.code}" ${not empty searchInfo && searchInfo.source == item.code? 'selected' : '' } >${item.name}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <label class="col-sm-1 control-label">支付状态：</label>
                                    <div class="col-sm-2">
                                        <select class="form-control" name="payStatus" id="payStatus" onchange="doRefresh()">
                                            <option value="">--请选择--</option>
                                            <c:forEach items="${payStatusMap}" var="item">
                                                <c:if test="${item.key!='delete'}">
                                                    <option value="${item.key}" ${not empty searchInfo && searchInfo.payStatus == item.key? 'selected' : '' } >${item.value}</option>
                                                </c:if>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <label class="col-sm-1 control-label">业务类型：</label>
                                    <div class="col-sm-2">
                                        <select class="form-control" name="bizCode" id="bizCode" onchange="doSelectBiz()">
                                            <%--<option value="">--请选择--</option>--%>
                                            <c:forEach items="${bizCodeMap}" var="item">
                                                <option value="${item.code}" ${not empty searchInfo && searchInfo.bizCode == item.code? 'selected' : '' } >${item.name}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <label class="col-sm-1 control-label">服务项：</label>
                                    <div class="col-sm-2">
                                        <select class="form-control" name="cBizCode" id="cBizCode" onchange="doRefresh()">
                                            <%--<option value="">--请选择--</option>--%>
                                            <c:forEach items="${cBizCodeMap}" var="item">
                                                <option value="${item.code}" ${not empty searchInfo && searchInfo.cBizCode == item.code? 'selected' : '' } >${item.name}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><i class="fa fa-table"></i> 业务订单</h5>
                        <div class="ibox-tools col-sm-offset-2">
                            <button class="btn btn-primary btn-outline" onclick="openQueryOrderPage()">订单详情</button>
                            <c:if test="${userType == 'super' || not empty btnMap['exportOrder']}">
                                <button class="btn btn-primary btn-outline" onclick="doExport()">导出</button>
                            </c:if>
                            <button class="btn btn-primary btn-outline" onclick="doRefresh()">刷新</button>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <table class='table table-striped table-hover'
                               id="dataTable" data-height="400"
                               data-toggle="table"
                               data-url="${ctx}/bizContentOrder/pageFindOrderData?t=${now}"
                               data-pagination="true"
                               data-side-pagination="server"
                               data-striped="true"
                               data-response-handler="handleServerResult"
                               data-query-params-type=""
                               data-query-params="getParams"
                               data-page-number="${not empty searchInfo.pageNo ? searchInfo.pageNo : 1}"
                               data-page-size="${not empty searchInfo.pageSize ? searchInfo.pageSize : defaultPageSize}"
                               data-page-list="${pageList}">
                            <thead>
                            <tr>
                                <th data-field="id" data-visible="false">主键id</th>
                                <th data-field="isvPid" data-visible="false">isvPid</th>
                                <th data-field="orderId" data-align="center" data-width="250px">订单ID</th>
                                <th data-field="status" data-formatter="formatStatus" data-align="center" data-width="100px">订单状态</th>
                                <th data-field="payStatus" data-formatter="formatPayStatus" data-align="center" data-width="100px">支付状态</th>
                                <th data-field="orderName" data-width="120px" data-align="center">订单名称</th>
                                <th data-field="realTradeFee" data-align="center" data-width="80px">订单金额（元）</th>
                                <th data-field="userId" data-align="center" data-width="100px">用户UID</th>
                                <th data-field="bizName" data-align="center" data-width="90px">业务类型</th>
                                <th data-field="cBizName"  data-align="center" data-width="90px">服务项</th>
                                <th data-field="channel" data-formatter="formatChannel"  data-align="center" data-width="120px">渠道</th>
                                <th data-field="source" data-formatter="formatSource" data-align="center" data-width="90px">订单来源</th>
                                <th data-field="isvName" data-formatter="formatIsv" data-events="actionEvents" data-align="center" data-width="120px">服务商</th>
                                <th data-field="orderCreateTimeStr" data-align="center" data-width="140px">订单创建时间</th>
                                <th data-field="payTimeStr" data-align="center" data-width="140px">交易时间</th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="text-center">${companyName}</div>
            </div>
        </div>
    </div>
</div>

<script src="${ctx}/js/order/bizContentOrderMgr.js?t=${now}"></script>
</body>
</html>


